package com.dragon.modules.yuegou.query.merchant;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.merchant.UserJpushMessageEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 商户用户极光IM对应关系表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2020-03-11 16:02:02
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class UserJpushMessageQuery extends UserJpushMessageEntity implements Query<UserJpushMessageEntity>{

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "merchantUserId")
	private Condition<String> merchantUserIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 状态，是否有效查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<Boolean> statusCondition;

    /** 极光username查询条件 */
	@JsonUnwrapped(prefix = "jpushUsername")
	private Condition<String> jpushUsernameCondition;

    /** 极光密码查询条件 */
	@JsonUnwrapped(prefix = "jpushPassword")
	private Condition<String> jpushPasswordCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public UserJpushMessageQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public UserJpushMessageQuery(UserJpushMessageEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public UserJpushMessageQuery(UserJpushMessageQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.merchantUserIdCondition != null) {
			this.merchantUserIdCondition = other.merchantUserIdCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
		if(other.jpushUsernameCondition != null) {
			this.jpushUsernameCondition = other.jpushUsernameCondition.copy();
		}
		if(other.jpushPasswordCondition != null) {
			this.jpushPasswordCondition = other.jpushPasswordCondition.copy();
		}
	}

	@Override
	public QueryWrapper<UserJpushMessageEntity> toQueryWrapper() {
		QueryWrapper<UserJpushMessageEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (merchantUserIdCondition != null) {
			merchantUserIdCondition.toWrapper(wrapper, COL_MERCHANT_USER_ID);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		if (jpushUsernameCondition != null) {
			jpushUsernameCondition.toWrapper(wrapper, COL_JPUSH_USERNAME);
		}
		if (jpushPasswordCondition != null) {
			jpushPasswordCondition.toWrapper(wrapper, COL_JPUSH_PASSWORD);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return merchantIdCondition 查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return merchantIdCondition 查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param merchantIdCondition 查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return merchantUserIdCondition 查询条件
	 */
	public Condition<String> merchantUserId() {
		this.merchantUserIdCondition = new Condition<>();
		return this.merchantUserIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return merchantUserIdCondition 查询条件
	 */
	public Condition<String> getMerchantUserIdCondition() {
		return merchantUserIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param merchantUserIdCondition 查询条件
	 */
	public void setMerchantUserIdCondition(Condition<String> merchantUserIdCondition) {
		this.merchantUserIdCondition = merchantUserIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdTimeCondition 查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回状态，是否有效查询条件
	 * 
	 * @return statusCondition 状态，是否有效查询条件
	 */
	public Condition<Boolean> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取状态，是否有效查询条件
	 * 
	 * @return statusCondition 状态，是否有效查询条件
	 */
	public Condition<Boolean> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置状态，是否有效查询条件
	 * 
	 * @param statusCondition 状态，是否有效查询条件
	 */
	public void setStatusCondition(Condition<Boolean> statusCondition) {
		this.statusCondition = statusCondition;
	}

	/**
	 * 构造并返回极光username查询条件
	 * 
	 * @return jpushUsernameCondition 极光username查询条件
	 */
	public Condition<String> jpushUsername() {
		this.jpushUsernameCondition = new Condition<>();
		return this.jpushUsernameCondition;
	}
	
	/**
	 * 获取极光username查询条件
	 * 
	 * @return jpushUsernameCondition 极光username查询条件
	 */
	public Condition<String> getJpushUsernameCondition() {
		return jpushUsernameCondition;
	}

	/**
	 * 设置极光username查询条件
	 * 
	 * @param jpushUsernameCondition 极光username查询条件
	 */
	public void setJpushUsernameCondition(Condition<String> jpushUsernameCondition) {
		this.jpushUsernameCondition = jpushUsernameCondition;
	}

	/**
	 * 构造并返回极光密码查询条件
	 * 
	 * @return jpushPasswordCondition 极光密码查询条件
	 */
	public Condition<String> jpushPassword() {
		this.jpushPasswordCondition = new Condition<>();
		return this.jpushPasswordCondition;
	}
	
	/**
	 * 获取极光密码查询条件
	 * 
	 * @return jpushPasswordCondition 极光密码查询条件
	 */
	public Condition<String> getJpushPasswordCondition() {
		return jpushPasswordCondition;
	}

	/**
	 * 设置极光密码查询条件
	 * 
	 * @param jpushPasswordCondition 极光密码查询条件
	 */
	public void setJpushPasswordCondition(Condition<String> jpushPasswordCondition) {
		this.jpushPasswordCondition = jpushPasswordCondition;
	}

}
